<?php

namespace app\admin\validate;

use think\Validate;

class Category extends Validate
{
    protected $rule = [
        'name'  => 'require|max:20',
    ];

    protected $message = [
        'name.require' => '分类名称不能为空',
        'name.max'     => '分类名称最多不能超过20个字符',
    ];
}